package cn.edu.sdjzu.xg.bysj.domain;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;

import java.util.List;

/**
 * 02 * 表示学生提交的选择导师的志愿。
 * 03
 */
@Setter
@Getter
//全参构造器
@AllArgsConstructor
//无参构造器
@NoArgsConstructor
//表示学生提交的选择导师的志愿。
public final class ApplicationForSupervisor implements
        Comparable<ApplicationForSupervisor>, Serializable {
    //志愿集合
    private List<ApplicationForSupervisorEntry> applicationForSupervisorEntries;
    private Integer id;
    //自我介绍
    private String selfIntroduction;
    //填写志愿的学生
    private Student student;
    //年份
    private int year;

    public ApplicationForSupervisor(List<ApplicationForSupervisorEntry> applicationForSupervisorEntries
            , String selfIntroduction, Student student, int year) {
        this.applicationForSupervisorEntries = applicationForSupervisorEntries;
        this.selfIntroduction = selfIntroduction;
        this.student = student;
        this.year = year;
    }

    @Override
    public int compareTo(ApplicationForSupervisor
                                 applicationForSupervisor) {
        return this.id - applicationForSupervisor.id;
    }
}
